package org.example.service.impl;

import jakarta.annotation.Resource;
import org.example.mapper.VolunteersMapper;
import org.example.service.VolunteersService;
import org.example.utils.R;
import org.example.utils.VolunteersUpdateRequest;
import org.springframework.stereotype.Service;

/**
 * ClassName: VolunteersServiceImpl
 * Description:
 *
 * @Author Kotaro
 * @Create 2024/12/9 11:20
 * @Version 1.0
 */
@Service
public class VolunteersServiceImpl implements VolunteersService {
    @Resource
    VolunteersMapper volunteersMapper;
    @Override
    public R updateVolunteersByVolunteersId(VolunteersUpdateRequest volunteersUpdateRequest) {
        int rows = volunteersMapper.updateVolunteersByVolunteersId(volunteersUpdateRequest);
        if(rows> 0){
            return R.successful("修改成功" , volunteersUpdateRequest);
        }else {
            return R.error("修改失败" , null);
        }
    }
}
